<template>
<el-scrollbar style="height:100%;">
  <div class="container p-20">
    <el-row>
      <el-col :offset="3" :span="18">
        <p class="f-17">{{data.coefficientName}}</p>
      </el-col>
    </el-row>
    <el-row>
      <el-col :offset="3" :span="18">
        <table border="1" cellspacing="0">
          <tr>
            <td rowspan="5">水费系数</td>
            <td>小于{{data.lessThanWater}}吨</td>
            <td>水费单价:{{data.lessUnitPriceOfWater}}元/吨</td>
            <td>污水处理单价:{{data.lessUnitPriceOfSewageTreatment}}元/吨</td>
          </tr>
          <tr>
            <td>16至20吨</td>
            <td>水费单价:4.01元/吨</td>
            <td>污水处理单价:1元/吨</td>
          </tr>
          <tr>
            <td>大于{{data.greaterThanWater}}吨</td>
            <td>水费单价:{{data.greaterUnitPriceOfWater}}元/吨</td>
            <td>污水处理单价:{{data.greaterUnitPriceOfSewageTreatment}}元/吨</td>
          </tr>
          <tr>
            <td>水损系数:{{data.waterLossCoefficient}}</td>
            <td>污水比例:{{data.sewageRatio}}</td>
            <td>垃圾处理费:{{data.wasteDisposalFee}}元/户</td>
          </tr>
          <tr>
            <td>水费税率:{{data.waterTariffRate}}</td>
            <td></td>
            <td>免垃圾处理数:<={{data.tonsOfWasteFreeTreatmentFee}}吨 </td>
          </tr>
          <tr>
            <td rowspan="3">电费系数</td>
            <td>小于{{data.lessElectricityConsumption}}度</td>
            <td>电费单价:{{data.lessUnitPriceOfElectricity}}元/度</td>
            <td>电损系数:{{data.electricLossCoefficient}}</td>
          </tr>
          <tr>
            <td>50000度至90000度</td>
            <td>电费单价:0.7018元/度</td>
            <td></td>
          </tr>
          <tr>
            <td>高于90000度</td>
            <td>电费单价:0.7018元/度</td>
            <td></td>
          </tr>
          <tr>
            <td rowspan="2">煤气系数</td>
            <td>小于{{data.greaterDegreeOfGas}}度</td>
            <td>煤气单价:{{data.unitPriceOfGasInIndex}}元/立方</td>
            <td></td>
          </tr>
          <tr>
            <td>{{data.greaterDegreeOfGas}}度及以上</td>
            <td>煤气单价:{{data.unitPriceOfGasBeyondIndex}}元/立方</td>
            <td></td>
          </tr>
        </table>
      </el-col>
    </el-row>
  </div>
</el-scrollbar>
</template>
<script>
  import {
    getCostTemplateById
  } from '@/api/operations/cost/cost.js';
  export default {
    data() {
      return {
        data:{}
      };
    },
    methods: {
      loadData(v) {
        getCostTemplateById(v,0).then(res=>{
          if(res.code===10000){
            this.data = res.data;
          }
        });
      },
    },
    mounted() {
      if (this.$route.params.id) {
        this.loadData(this.$route.params.id);
      }
    },
  };
</script>
<style scoped>
  p {
    margin: 5px 0;
  }

  table {
    width: 100%;
    margin: 10px 0;
    border: 1px solid #e6e6e6;
  }

  table td,
  table th {
    font-size: 0.2rem;
    font-weight: 500;
    border: 1px solid #e6e6e6;
    line-height: 0.35rem;
    padding-left: 0.1rem;
    min-width: 1rem;
  }
</style>
